﻿using Avalonia.Data.Converters;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 畜牧业审核程序国产.Models.RagModel.SenderConverter
{
    internal class SenderToAlignmentConverter : IValueConverter
    {
        public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
        {

            if (value is string sender)
            {
                return sender.Equals("user", StringComparison.OrdinalIgnoreCase) ? "Right" : "Left";
            }
            return "Left";
        }

        public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
